package com.dubbo.demo.service.impl;

import com.dubbo.demo.pojo.User;
import com.dubbo.demo.service.UserService;

public class UserServiceImpl implements UserService{
    @Override
    public User getUser(int id) {
        User user = new User();
        switch (id){
            case 1:
                user.setId(id);
                user.setName("成龙");
                user.setAge(56);
                break;
            case 2:
                user.setId(id);
                user.setName("李连杰");
                user.setAge(53);
                break;
        }
        System.out.println("服务消费成功！");
        return user;
    }
}
